package com.ruoyi.web.controller.hatdevice.orderlogs;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.HatDeviceLog;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.device.domain.DeviceAlarmHistory;
import com.ruoyi.device.domain.HatDeviceOrderLogs;
import com.ruoyi.device.domain.req.alarm.AlarmHistoryReq;
import com.ruoyi.device.domain.req.orderlogs.OrderLogsReq;
import com.ruoyi.device.service.HatDeviceOrderLogsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author wy
 * @Description 帽子指令发送和回复记录表
 * @Date 2023/12/7 17:37
 * @Version 1.0
 */
@RestController
@RequestMapping(value = "/orders")
public class HatDeviceOrderLogsController extends BaseController {

    @Autowired
    private HatDeviceOrderLogsService hatDeviceOrderLogsService;
    /**
     * 帽子指令发送和回复记录查询
     * @param req
     * @return
     */
    @GetMapping(value = "/data")
    public TableDataInfo list(OrderLogsReq req){
        super.startPage();
        List<HatDeviceOrderLogs> list=this.hatDeviceOrderLogsService.search(req);
        return super.getDataTable(list);
    }
}
